package com.ds.common.route.context;

/**
 * 运行时上下文持有者
 */
public class RuntimeContextHolder {

    private static final ThreadLocal<RuntimeContext> contextHolder = new ThreadLocal<>();

    static void setContext(RuntimeContext context) {
        contextHolder.set(context);
    }

    static RuntimeContext getContext() {
        return contextHolder.get();
    }

    static void clearContext() {
        contextHolder.remove();
    }
}
